﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.BLL;
using CMS.BLL.Entity;
using System.Net;
using System.IO; 
public partial class Controls_Common_ctrLiveSupport : System.Web.UI.UserControl
{
    private int nCurrentLanguage = Support.GetCurrentLanguage();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.InitData();
        
        }
    }
  

    private void InitData()
    {

        lblOnlineSupport.Text = MultipleLanguage.LIVESUPPORT[nCurrentLanguage - 1];

        Company objCompany = new Company();
        DataTable dtbCompany = new DataTable();
        dtbCompany = objCompany.Search();
        int nCompanyCount = dtbCompany.Rows.Count;
        int nCompanyLastestID = ConvertData.ConvertToInt(dtbCompany.Rows[nCompanyCount - 1]["CompanyID"]);
        objCompany.LoadById(nCompanyLastestID);

        ltrYahoo.Text = "<a href=\"ymsgr:sendim?" + objCompany.Data.YahooAccount1 + "\"" + "style=\"text-decoration: none;color: #FFF;\" class=\"notetext\"> <img src=\"http://opi.yahoo.com/online?u=" + objCompany.Data.YahooAccount1 + "&m=g&t=2&l=us\" border=\"0\" />&nbsp;<span style=\"color:black; font-weight:bold\"></span></a>";
        ltrSkype.Text = "<a href=\"skype:" + objCompany.Data.SkypeAccount1 + "?call\"><img src=\"http://mystatus.skype.com/bigclassic/" + objCompany.Data.SkypeAccount1 +"\" style=\"border: none;\" width=\"125\" height=\"33\" /></a>";




    
    }



}